import type { RouteRecordRaw } from 'vue-router'
import { createRouter, createWebHashHistory } from 'vue-router'

const routes: RouteRecordRaw[] = [
  // 解决路由动态传参错误的问题
  {
    path: '/:catchAll(.*)',
    component: () => import('@/view/error/404.vue'),
  },
  {
    path: '/A',
    component: () => import('@/view/one/index.vue'),
  },
  {
    path: '/B',
    component: () => import('@/view/Two/index.vue'),
  },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes,
})
export default router
